<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!-- vsb.xhtml - Main program UI
  -  This file is a part of Visual struct Builder
  -  
  -  Copyright © 2013, Kirn Gill II <segin2005@gmail.com>
  -  
  -  Permission to use, copy, modify, and/or distribute this software for any
  -  purpose with or without fee is hereby granted, provided that the above
  -  copyright notice and this permission notice appear in all copies.
  -  
  -  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  -  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  -  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  -  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  -  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  -  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  -  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
	<title>Visual struct Builder</title>
</head>
<body>
	<script type="text/javascript" src="vsb.js"></script>
	<p>Visual struct Builder - Copyright © 2013, Kirn Gill II 
	&lt;<a href="mailto:segin2005@gmail.com">segin2005@gmail.com</a>&gt;.</p>
	<p>This tool is used for building disk-serializable C structs. 
	Only a subset of standard types are allowed.</p>
	<p>Please note: Input variables are not checked or sanitized.</p>

	<div>
		<button type="button" onclick="resetBuilder();">Reset Builder</button>
		<button type="button" onclick="addElem();">Add Element</button>
		<button type="button" onclick="moveUp();">Move Elements Up</button>
		<button type="button" onclick="moveDown();">Move Elements Down</button>
	</div>
	<div id="builder">
		<label for="typedef">TypeDef?</label>
		<input type="checkbox" id="typedef" onclick="typedefHide();"/>
		<label for="structname">struct</label>
		<input type="text" id="structname" />
		<div id="elems">
		</div>
		<div id="tdnh">
			<label for="typedefname" class="tdn">Type name:</label>
			<input type="text" id="typedefname" class="tdn" />
		</div>
		<button type="button" onclick="generateCode();">Generate Code</button>
		<script type="text/javascript">
			/* Initialize the builder. */
			addElem();
			typedefHide();
		</script>
	</div>

	<p>Output structure:</p>
	<pre><code id="output">
	</code></pre>
</body>
</html>